package org.softmed.neodatis.persistence.impl;

import java.io.File;

import org.softmed.neodatis.util.provider.ODBProvider;
import org.softmed.persistence.PersistenceManager;
import org.softmed.persistence.PersistenceProvider;

public class ODBPersistenceProvider implements PersistenceProvider {

	ODBProvider provider;

	public ODBPersistenceProvider(ODBProvider provider) {
		this.provider = provider;
	}

	@Override
	public PersistenceManager getPersistenceManager() throws Throwable {
		return new ODBPersistenceManager(provider);
	}

	@Override
	public void restart() throws Throwable {
		provider.restart();
	}

	@Override
	public void erase() throws Throwable {
		provider.erase();
	}

	@Override
	public void start() throws Throwable {
		provider.start();

	}

	@Override
	public void stop() throws Throwable {
		provider.stop();

	}

	@Override
	public void refreshClassDefinitions() throws Throwable {
		provider.refreshClassDefinitions();
	}

	@Override
	public File getDatabaseFile() throws Throwable {
		return provider.getDatabaseFile();
	}
}
